home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / online / ibrowse_plugins / openurl / install < prev    next >
Text File  |  2004-08-03  |  3KB  |  126 lines

  1. ; $VER: Install OpenURL 4.4 (1.3.2003)
  2. ;
  3. ; openurl.library - universal URL display and browser launcher library
  4. ; Written by Troels Walsted Hansen <troels@thule.no>
  5. ; Placed in the public domain.
  6. ;
  7. ; Installer script for openurl.library and tools.
  8.  
  9. (set #exitmsg "\n\nIf you are a developer and wish to use\nopenurl.library, check out the included\ndocumentation and source code.")
  10.  
  11. ; Welcome screen
  12.  
  13. (welcome "\nThis installer script will install openurl.library and tools.\nopenurl.library is a universal URL display and browser launcher library.")
  14.  
  15. ; Copy files
  16.  
  17. (copylib
  18.     (prompt "Installing the library")
  19.     (help @copyfiles-help)
  20.     (source "Libs/openurl.library")
  21.     (dest "Libs:")
  22. )
  23.  
  24. (copylib
  25.     (prompt "Installing the handler")
  26.     (help @copyfiles-help)
  27.     (source "L/OpenURL-Handler")
  28.     (dest "L:")
  29. )
  30.  
  31. (copyfiles
  32.     (prompt "Installing the preference program")
  33.     (help @copyfiles-help)
  34.     (source "Prefs/OpenURL")
  35.     (dest "SYS:Prefs")
  36.     (infos)
  37.     (noposition)
  38. )
  39.  
  40. (copylib
  41.     (prompt "Installing the Popport.mcc MUI class")
  42.     (help @copyfiles-help)
  43.     (source "MUI/Popport.mcc")
  44.     (dest "MUI:Libs/MUI")
  45. )
  46.  
  47. (copylib
  48.     (prompt "Installing the Popplaceholder.mcc MUI class")
  49.     (help @copyfiles-help)
  50.     (source "MUI/Popplaceholder.mcc")
  51.     (dest "MUI:Libs/MUI")
  52. )
  53.  
  54. (copyfiles
  55.     (prompt "Installing the optional commandline tool")
  56.     (help "This is a small tool that allows you to open URLs from the commandline.")
  57.     (source "C/OpenURL")
  58.     (dest "C:")
  59.     (confirm)
  60. )
  61.  
  62. (
  63.     (set #catSourceDir (tackon "Catalogs" @language))
  64.     (set #catDestDir (tackon "Locale:" (tackon "Catalogs" @language)))
  65.     (if (= (and (= (exists (#catSourceDir)) 2) (= (exists (#catDestDir)) 2)) 1)
  66.         (foreach #catSourceDir "#?"
  67.             (copylib
  68.                 (source (tackon #catSourceDir @each-name))
  69.                 (dest #catDestDir)
  70.             )
  71.         )
  72.     )
  73. )
  74.  
  75. (copyfiles
  76.     (prompt "Installing the optional ARexx OpenURL script")
  77.     (help "This is a small example script that opens URLs.")
  78.     (source "Rexx/OpenURL.rexx")
  79.     (dest "S:")
  80.     (confirm)
  81. )
  82.  
  83. (if
  84.     (exists "ENV:THOR/THORPath")
  85.  
  86.     (copyfiles
  87.         (prompt "Installing the optional THOR ARexx mailto script")
  88.         (help "If you use THOR and wish to use that to handle mailto URLs, install this script. If you install it to directory other than the default, make sure to change it in the OpenURL prefs as well.")
  89.         (source "Rexx/SendThorMail.rexx")
  90.         (dest (tackon (pathonly (getenv "THOR/THORPath")) "Rexx"))
  91.         (confirm)
  92.     )
  93. )
  94.  
  95. ; Set environment variable
  96.  
  97. (run "Echo SYS:Prefs/OpenURL >ENV:OpenURL_Prefs_Path")
  98. (run "Echo SYS:Prefs/OpenURL >ENVARC:OpenURL_Prefs_Path")
  99.  
  100. ; Flush
  101.  
  102. (message "Before proceeding, you must quit all programs using openurl.library, so that the old version can be flushed from memory.")
  103. (run "Avail FLUSH")
  104.  
  105. ; Ask whether to run prefs program
  106.  
  107. (if
  108.     (=
  109.         (askbool
  110.             (prompt "You should run the preferences program now to set your browser path(s) and other preferences. Would you like me to launch it?")
  111.             (help "")
  112.             (default 1)
  113.         )
  114.  
  115.         1
  116.     )
  117.  
  118.     (run "SYS:Prefs/OpenURL")
  119. )
  120.  
  121. ; Exit
  122.  
  123. (exit #exitmsg
  124.     (quiet)
  125. )
  126.